package com.bangdao.app.jetpacktest.jetpack.databinding;

import androidx.appcompat.app.AppCompatActivity;
import androidx.databinding.DataBindingUtil;

import android.app.Activity;
import android.os.Bundle;

import com.bangdao.app.jetpacktest.R;
import com.bangdao.app.jetpacktest.databinding.ActivityCustomBindingAdapterBinding;

public class CustomBindingAdapterActivity extends AppCompatActivity {

    private ActivityCustomBindingAdapterBinding binding;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        binding = DataBindingUtil.setContentView(this, R.layout.activity_custom_binding_adapter);

        binding.setNetworkImage("https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fimg.jj20.com%2Fup%2Fallimg%2Ftp09%2F21061109241GT3-0-lp.jpg&refer=http%3A%2F%2Fimg.jj20.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1656936797&t=7ec62da5d9398c38f0369b35ef0185cb");

        binding.setLocalImage(R.drawable.test);
    }
}